seatunnel-2.3.3
撰写时间: 2023-10-31 总共: 3124 字 转载请注明: BY-SA 4.0(除特别声明或转载文章外)
环境配置
环境:Window10、VMware 16
apache-seatunnel-2.3.3-bin.tar.gz
jdk-8u301-linux-x64.tar.gz
apache-maven-3.8.6-bin.tar.gz
安装镜像:ubuntu-22.04.3-live-server-amd64.iso
更新环境
设置root密码
sudo passwd root
更换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list_bak
lsb_release -a
### EOF 覆盖输入到 /etc/apt/sources.list
sudo bash -c "cat << EOF > /etc/apt/sources.list && apt update
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
EOF"
Java 环境脚本
#!/bin/bash
echo "开始配置jdk-8u301-linux-x64.tar.gz"
rm -rf /usr/local/java/jdk1.8.0_301
rm /etc/profile.d/java.sh
mkdir -p /usr/local/java/jdk1.8.0_301
echo "解压jdk-8u301-linux-x64.tar.gz"
tar -zxvf jdk-8u301-linux-x64.tar.gz
sleep 10
echo "解压完毕"
echo "配置JDK环境变量"
mv -f jdk1.8.0_301/ /usr/local/java
sleep 2
cat <<'EOF' > /etc/profile.d/java.sh
export JAVA_HOME=/usr/local/java/jdk1.8.0_301
export PATH=$PATH:$JAVA_HOME/bin
EOF
sleep 1
source /etc/profile.d/java.sh
echo "JAVA_HOME目录:"${JAVA_HOME}
echo "JDK环境变量配置完毕"
echo "验证JDK版本..."
java -version
echo "JDK版本验证完毕"
echo "开始配置apache-maven-3.8.6-bin.tar.gz"
rm -rf /usr/local/java/apache-maven-3.8.6
rm /etc/profile.d/maven.sh
mkdir -p /usr/local/java/apache-maven-3.8.6
echo "解压apache-maven-3.8.6-bin.tar.gz"
tar -zxvf apache-maven-3.8.6-bin.tar.gz
sleep 10
echo "解压完毕"
echo "配置Maven环境变量"
mv -f apache-maven-3.8.6/ /usr/local/java
sleep 2
cat <<'EOF' > /etc/profile.d/maven.sh
export M2_HOME=/usr/local/java/apache-maven-3.8.6
export PATH=$PATH:$M2_HOME/bin
EOF
sleep 1
source /etc/profile.d/maven.sh
echo "M2_HOME目录:"${M2_HOME}
echo "Maven环境变量配置完毕"
echo "验证Maven版本..."
mvn -version
echo "Maven版本验证完毕"
配置Java和Maven
将压缩包和安装脚本上传到同一个文件夹下
#/home/soft
sudo chmod 777 ./soft/
sudo bash jdkInstall.sh
配置Maven源
sudo mkdir -p /usr/local/java/apache-maven-3.8.6/repos
sudo vim /usr/local/java/apache-maven-3.8.6/conf/settings.xml
# 修改如下
<localRepository>/usr/local/java/apache-maven-3.8.6/repos</localRepository>
# 添加
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
安装apache-seatunnel
# 解压
tar -zxvf apache-seatunnel-2.3.3-bin.tar.gz
#修改config
cd apache-seatunnel-2.3.3/config/
sudo cp plugin_config plugin_config_bak
sudo bash -c "cat << EOF > /home/soft/apache-seatunnel-2.3.3/config/plugin_config
--seatunnel-connectors--
connector-fake
connector-console
--end--
EOF"
cd ..
#
sh bin/install-plugin.sh 2.3.3
启动
./bin/seatunnel.sh --config ./config/v2.batch.config.template -e local